home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 003-desktop.lzm / usr / bin / pcre-config < prev    next >
Encoding:
Text File  |  2008-07-24  |  1.2 KB  |  70 lines

  1. #!/bin/sh
  2.  
  3. prefix=/usr
  4. exec_prefix=${prefix}
  5. exec_prefix_set=no
  6.  
  7. usage="\
  8. Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
  9.  
  10. if test $# -eq 0; then
  11.       echo "${usage}" 1>&2
  12.       exit 1
  13. fi
  14.  
  15. libR=
  16. case `uname -s` in
  17.   *SunOS*)
  18.   libR=" -R${exec_prefix}/lib"
  19.   ;;
  20.   *BSD*)
  21.   libR=" -Wl,-R${exec_prefix}/lib"
  22.   ;;
  23. esac
  24.  
  25. while test $# -gt 0; do
  26.   case "$1" in
  27.   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  28.   *) optarg= ;;
  29.   esac
  30.  
  31.   case $1 in
  32.     --prefix=*)
  33.       prefix=$optarg
  34.       if test $exec_prefix_set = no ; then
  35.         exec_prefix=$optarg
  36.       fi
  37.       ;;
  38.     --prefix)
  39.       echo $prefix
  40.       ;;
  41.     --exec-prefix=*)
  42.       exec_prefix=$optarg
  43.       exec_prefix_set=yes
  44.       ;;
  45.     --exec-prefix)
  46.       echo $exec_prefix
  47.       ;;
  48.     --version)
  49.       echo 7.7
  50.       ;;
  51.     --cflags | --cflags-posix)
  52.       if test ${prefix}/include != /usr/include ; then
  53.         includes=-I${prefix}/include
  54.       fi
  55.       echo $includes
  56.       ;;
  57.     --libs-posix)
  58.       echo -L${exec_prefix}/lib$libR -lpcreposix -lpcre
  59.       ;;
  60.     --libs)
  61.       echo -L${exec_prefix}/lib$libR -lpcre
  62.       ;;
  63.     *)
  64.       echo "${usage}" 1>&2
  65.       exit 1
  66.       ;;
  67.   esac
  68.   shift
  69. done
  70.